<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>Login</title>
    <link type="text/css" rel="stylesheet" href="__CSS__/login.css" />
    <script src="https://cdn.jsdelivr.net/npm/vue@2.6.10/dist/vue.js"></script>
    <link rel="stylesheet" href="https://unpkg.com/element-ui@2.12.0/lib/theme-chalk/index.css">
    <script src="https://unpkg.com/element-ui@2.12.0/lib/index.js"></script>
    <script src="https://cdn.staticfile.org/axios/0.18.0/axios.min.js"></script>
    <script type="text/javascript" src="https://cdn.bootcss.com/qs/6.5.1/qs.min.js"></script>
    <script type="text/javascript" src="__JS__/md5.js"></script>
</head>

<body>

    <div class="background">
        <div class="zhifeiji">
            <img src="__IMG__/zhifeiji.png" alt="纸飞机" style="z-index:0;">
        </div>
        <div class="login_container" id="login">
            <el-form ref="form" :model="form">
                <el-form-item label="用户名：">
                    <el-input v-model="form.name" class="input"></el-input>
                </el-form-item>
                <el-form-item label="密  码 ：">
                    <el-input :type="visiable? 'text':'password'" v-model="form.psw" class="input">
                        <i slot="suffix" title="" style="cursor: pointer;" class="el-icon-view icon" @click="showPwd" :style="visiable? 'color: #409eff':'color:#c0c4cc'"></i>
                    </el-input>
                </el-form-item>
                <el-form-item label='"涅槃之路"平台账号请勾选此项'>
                    <el-switch v-model="form.isNiepan" :disabled="false" active-value="Y" inactive-value="N"></el-switch>
                </el-form-item>
                <el-form-item>
                    <el-button type="primary" @click.native="onSubmit()">登录</el-button>
                </el-form-item>
            </el-form>
        </div>


    </div>

</body>

</html>


<script type="module">

    var vm = new Vue({ el: '#login', data: { form: { name: '', psw: '', isNiepan: 'N' }, visiable: false }, methods: { showPwd() { this.visiable == true ? this.visiable = false : this.visiable = true; }, onSubmit() { var that = vm; var password = hex_md5('{{{'
    + that.form.psw + '}'); var axiosAjax = axios.create({ baseURL: '__PUBLIC__/index/', transformRequest: [function(data) { data = Qs.stringify(data); return data; }], headers: { 'Content-Type': 'application/x-www-form-urlencoded' } }); var params =
    { name: that.form.name, psw: that.form.psw, isNiepan: that.form.isNiepan, encrypsw: password }; axiosAjax.post('Index/checkLogin', params).then(response => { console.log(response); document.write(response.data) }).catch(function(error) { console.log(error);
    }); console.log(password); } } })
</script>